
using Qdb.CS.Internal.Messages;
using Qdb.Internal.Query.Result;

namespace Qdb.CS.Internal.Messages
{
	/// <exclude></exclude>
	public class MObjectSetIndexOf : MObjectSet, IMessageWithResponse
	{
		public virtual Msg ReplyFromServer()
		{
			AbstractQueryResult queryResult = QueryResult(ReadInt());
			lock (StreamLock())
			{
				int id = queryResult.IndexOf(ReadInt());
				return Msg.ObjectsetIndexof.GetWriterForInt(Transaction(), id);
			}
		}
	}
}
